﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace _10_元素绑定
{
    /// <summary>
    /// _04_绑定到非元素DataContext.xaml 的交互逻辑
    /// </summary>
    public partial class _04_绑定到非元素DataContext : Window
    {
        public _04_绑定到非元素DataContext()
        {
            InitializeComponent();
            this.DataContext = new Student() { Name = "赵剑波", Age = 18 };
        }
        public class Student
        {
            public string  Name{ get; set; }
            public int Age{ get; set; }
        }
    }
}
